deps= `pkg-config --cflags --libs x11 glib-2.0 gdk-3.0 atk gcr-4 gtk+-3.0  webkit2gtk-4.1 webkit2gtk-web-extension-4.1 gio-2.0` -lgthread-2.0

all: format
	clang++ -DGCR_API_SUBJECT_TO_CHANGE \
	-Wno-c99-designator -Wno-writable-strings \
	-I include -I . \
	-o mibr \
	src/main.cpp src/apis_impl.cpp \
	${deps} \
	&& ./mibr

share_lib:
	clang++  -O3 -fPIC `pkg-config --cflags  webkit2gtk-web-extension-4.1 gio-2.0` ${CFLAGS} -c src/lib/webext.cpp
	clang++ -shared -Wl,-soname,webext.so ${LDFLAGS} -o webext.so webext.o `pkg-config --libs webkit2gtk-web-extension-4.1 gio-2.0`

deps:
	echo ${deps}

clean:
	rm -rf mibr

format:
	@clang-format -i src/*.cpp include/*.hpp *.h src/**/*.cpp
